package example {

import javax.servlet._
import javax.servlet.http.HttpUtils
import javax.servlet.http.{HttpServlet,
  HttpServletRequest => HSReq, HttpServletResponse => HSResp}

  class HelloServlet extends HttpServlet {
    override def init(){
    }
    
    override def doGet(req : HSReq, resp : HSResp)
    {
      resp.setContentType("text/html")
      val out = resp.getWriter()
      out.println( List("Denny","added","scala","List")+"Hello World! <br />" )
      out.println( new HelloBean().getMessage + "<br />" )

      val qlistXML = <ul>{
      for(q <- Question.listAll() ) yield
        <li>Question: { q.q }</li>
      }
      </ul>

      out.println(qlistXML)
    }
  }
}
